package edu.netjava.StudentManager;


import java.util.Scanner;
import java.util.Vector;

import edu.netjava.Student.Student;

public class StudentManager {
	
	
	Vector vec =new Vector();
	
	public StudentManager(Vector vec){
		this.vec = vec;
	}
	Scanner sca = new Scanner(System.in);
//	ArrayList ali;
	public void addStudent(Student stu){
		
//		String s="abc";
//		s="aaa"+s;
//		
//		java.util.Scanner sc=new java.util.Scanner(System.in);
		
//		
//		StringBuffer stb=new StringBuffer();
//		stb.append(sc.next());
//		stb.append("efb");
//		
//		s=stb.toString();
		
		
		
		
		System.out.println("Please input the information of the studnet:");
		System.out.println("Please input the name of the student:");
		stu.setName(sca.next());
		System.out.println("Please input the age of the student:");
		stu.setAge(sca.nextInt());
		System.out.println("Please input the class the student belong to: ");
		stu.setClas(sca.next());
		vec.add(stu);
	}
	
	public void printStudent(){
		System.out.println("------------------------");
		System.out.println("--Student----Name----Age--");
		for(int i = 0;i<vec.size();i++){
			
			System.out.println("--"+((Student)vec.elementAt(i)).getName()+"------"
					+((Student)vec.elementAt(i)).getAge()+"------"+((Student)vec.elementAt(i)).getClas()+"--");
			
		}
		System.out.println("------------------------");
		
	}

}
